#pragma once

#define DEG_TO_RAD(x) ((x) * PI / 180.0f)
#define RAD_TO_DEG(x) ((x) * 180.0f / PI)

float saturate(float value);

namespace mmath
{
	// Creates 3x3 matrix with orthonormal base with x pointing at X axis.
	// x assumed to be normalized
	XMMATRIX constructBaseFromVector(XMVECTOR x);

	XMVECTOR quaternionMultiply(FXMVECTOR Q1, FXMVECTOR Q2);

	XMVECTOR quaternionToEulerAngles(XMVECTOR quat);

	XMMATRIX matrixFromAxes(XMVECTOR right, XMVECTOR up, XMVECTOR forward);
}